<?php
	
	require_once(dirname(__FILE__)."/../core/safeParam.php");
	
	class module{
		function Add($vars){
			global $database;
			
    		$action['name']    = $vars['name'];
    		$action['subject'] = $vars['subject'];
    		$action['email']   = $vars['email'];
    		$action['rid']     = $vars['rid'];
    		$database->insert_array('order_status', $action);
    		
    		header("Location: ../admin/index.php?edit=order_status&updated=1");
  		}
  		
  		function Edit($vars){
    		global $database;
    		
    		$action['name']    = $vars['name'];
    		$action['subject'] = $vars['subject'];
    		$action['email']   = $vars['email'];
    		$database->update_array('order_status', $action, "id = " . $vars['id'] . "");
    		
    		header("Location: ../admin/index.php?edit=order_status&updated=1");
  		}
  		
  		function Delete($vars){
    		global $database;
    		
    		$database->delete('order_status', "id = " . $vars['id'] . "");
    		
    		header("Location: ../admin/index.php?edit=order_status&updated=1");
  		}
	}
?>
